<?php

/******************************************
 * File:			lib_core/head.php
 * Version:			1.0.3
 * Last modified:	21/10/2009
 * Last modifier:	Hugo Lavigne
 *****************************************/

DEFINE (CONFIG_PATH, "data/config/path.php");
 
#Load libraries
	require_once (CONFIG_PATH);
	include_once ("$path_php/lib_sessions.php");
	include_once ("$path_php/lib_imports.php");
	include_once ("$path_core/libs.php");
	
	load_libs();

#Get configuration path files
	$_SESSION['current_path'] = $path_apps.get_page_name($_SERVER['SCRIPT_NAME']);
	$_SESSION['path_config_path'] = $path_config_path;
	$_SESSION['path_config_default'] = $path_config_default;
	$_SESSION['path_config_mysql'] = $path_config_mysql;
	$_SESSION['path_config_ldap'] = $path_config_ldap;
	$_SESSION['path_config_version'] = $path_config_version;
	$_SESSION['path_config_logs'] = $path_config_logs;

#Making SESSION
	if (file_exists("data/config/install.php"))
	{
		require ($_SESSION['path_config_version']);
		$_SESSION['path_core'] = $path_core;
		$_SESSION['path_apps'] = $path_apps;
		$_SESSION['path_images'] = $path_images;
		$_SESSION['path_css'] = $path_css;
		$_SESSION['path_js'] = $path_js;
		$_SESSION['css'] = $template_default;
		$_SESSION['path_templates'] = $path_templates;
		$_SESSION['path_webadmin'] = $path_webadmin;
	}
	else
		make_session();
	
#Show page
	show();

?>